<table width="100%" border="0" cellspacing="0" cellpadding="1">
<TR class="header">
	<TH>ID</TH>
	<TH width=40%>Group Name</TH>
	<TH colspan="2">Active Recipients</TH>
	<TH># of Campaigns</TH>
	<TH></TH>
	<TH>Combine Group</TH>
</TR>
<TR>
	<TH></TH>
	<TD><a onClick="RefreshGroups(1);">Active</a> | <a onClick="RefreshGroups(0);">Inactive</a></TD>
	<TD>Test</TH>
	<TD>Real</TH>
	<TH></TH>
	<TH></TH>
</TR>

<TMPL_LOOP name=GROUPS>
<TR>
    <TD><TMPL_VAR name=group_id></TD>
    <TD><TMPL_VAR name=group_name></TD>
    <TD><A href=addr.cgi?active=1&db_type=1&group_id=<TMPL_VAR name=group_id>&action=changeDBType><TMPL_VAR name=group_address_count_test></A></TD>
    <TD><A href=addr.cgi?active=1&db_type=2&group_id=<TMPL_VAR name=group_id>&action=changeDBType><TMPL_VAR name=group_address_count_real></A></TD>
    <TD style="text-align:center;">
            <!--<A href=Groups?group_id=<TMPL_VAR name=group_id>&action=changeDB><TMPL_VAR name=group_campaign_count></A>-->
            <A onClick="LoadCampaigns(<TMPL_VAR name=group_id>);"><TMPL_VAR name=group_campaign_count></A>
    </TD>
    <td width=25%>
        <a style="padding-left:5px;font-size:9px;color:#bbbbbb;" onClick="Load_EditGroup(<TMPL_VAR name=group_id>);">edit</a>
        <TMPL_IF name=active_groups>
            <a style="padding-left:5px;font-size:9px;color:#bbbbbb;" onClick="HideGroup(<TMPL_VAR name=group_id>);">hide</a>
        <TMPL_ELSE>
            <a style="padding-left:5px;font-size:9px;color:#bbbbbb;" onClick="ShowGroup(<TMPL_VAR name=group_id>);">activate</a>
        </TMPL_IF>
        <a style="padding-left:5px;font-size:9px;color:#bbbbbb;" href=>csv</a>
        <!--<a style="padding-left:5px;font-size:9px;color:#bbbbbb;" onClick="alert('download xml');">xml</a>-->
        <!--<a onClick="combine_group(<TMPL_VAR name=group_id>);" style="padding-left:5px;font-size:9px;color:#bbbbbb;">combine</a>-->
    </td>
    <td id=checkbox_combine>
        <input type=checkbox id=combine_<TMPL_VAR name=group_id> onClick="combine_group(<TMPL_VAR name=group_id>, this.value);" checked>
    </td>
</TR>
</TMPL_LOOP>
<TR class="totals">
    <TD colspan=2>&nbsp;</TD>
    <TH><TMPL_VAR name=total_test_addr></TH>
    <TH><TMPL_VAR name=total_real_addr></TH>
    <TH style="text-align:center;"><TMPL_VAR name=total_campaigns></TH>
    <th></th>
    <th><button id=do_combine>combine</button></th>
</TR>
</table>